namespace Example.Controllers
{
    using System.Globalization;
    using System.Web.Mvc;
    using Example.Models;
    using SimpleWebServices.Configuration;
    using SimpleWebServices.Web;
    using SimpleWebServices.Web.Mvc;

    [InternalServerError]
    [Allow(Methods = "GET, HEAD, OPTIONS")]
    [CacheControl, ContentLanguage, ContentLocation, ContentMD5]
    [Resource("home")]
    public sealed class HomeController : ResourceController
    {
        [ContentNegotiation(".html", "*/*, text/*, text/html")]
        public ActionResult HtmlRepresentation(CultureInfo language)
        {
            Home model = new Default().Object<Home>().ApplyDefaultValues<Home>();
            model.Expires = "P1D";

            return View(language, model);
        }

        [ContentNegotiation(".xhtml", "application/xhtml+xml")]
        public ActionResult XhtmlRepresentation(CultureInfo language)
        {
            Home model = new Default().Object<Home>().ApplyDefaultValues<Home>();
            model.Expires = "P1D";

            return View(language, model);
        }
    }
}